package tech.waterism.model.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * DHF模型输入数据
 * 
 * <p>封装了模型运行所需的全部输入数据，包括：</p>
 * <ul>
 *   <li>初始状态 - 模型的起始蓄水量和前期影响雨量</li>
 *   <li>模型参数 - 产流、汇流、流域特征、月蒸散发等参数</li>
 *   <li>降雨序列 - 时间序列降雨数据</li>
 * </ul>
 * 
 * @author 高宇
 * @since 2025-11-13
 */
public class DHFModelInput {
    
    /** 初始状态 */
    @JsonProperty("initialState")
    private DHFInitialState initialState;
    
    /** 模型参数（包含月蒸散发） */
    @JsonProperty("parameters")
    private DHFModelParameters parameters;
    
    /** 降雨时间序列 */
    @JsonProperty("rainfallSeries")
    private List<RainfallPoint> rainfallSeries;

    public DHFModelInput() {
    }

    public DHFModelInput(DHFInitialState initialState, DHFModelParameters parameters, 
                         List<RainfallPoint> rainfallSeries) {
        this.initialState = initialState;
        this.parameters = parameters;
        this.rainfallSeries = rainfallSeries;
    }

    public DHFInitialState getInitialState() {
        return initialState;
    }

    public void setInitialState(DHFInitialState initialState) {
        this.initialState = initialState;
    }

    public DHFModelParameters getParameters() {
        return parameters;
    }

    public void setParameters(DHFModelParameters parameters) {
        this.parameters = parameters;
    }

    public List<RainfallPoint> getRainfallSeries() {
        return rainfallSeries;
    }

    public void setRainfallSeries(List<RainfallPoint> rainfallSeries) {
        this.rainfallSeries = rainfallSeries;
    }

    @Override
    public String toString() {
        return "DHFModelInput{" +
                "initialState=" + initialState +
                ", parameters=" + parameters +
                ", rainfallSeries=" + (rainfallSeries != null ? rainfallSeries.size() + " points" : "null") +
                '}';
    }
}
